Hi SJH,
You are correct the ReadFlashData.c example has a bug. The 1MByte offset isn't added in when setting the FlashBank (or referencing the data address). It works because the SetFlashBank has a protection feature preventing access to the beginning of Flash which is the primary boot sector region. When attempting to set the FlashBank to that Block it is ignored and set to the beginning of the 2nd Meg of Flash instead.
See attached two block example.
Regarding your questions:
SetFlashBank sets the upper bits of any flash address (address bits 14 through 19) - but doesn't allow setting to first block.
The Flash chip is a 16-bit device hence the address and writes are performed as 16 bit writes.
In addition we found a bug in the ProgramFlash routine. Its difficult to explain but it is basically programming double the number of data as specified. But then check summing the total amount programmed with half of the input data used. This works if the extra data specified is all zero. The result of all this is that the entire 2 MBytes of Flash is currently being programmed with the 2nd MByte all zeros (unlike what we told you earlier). We intend to fix all this but may take some time.
We have also found the Reboot! command to still be unreliable.
Please give us some time to look into all these issues.
Regards
TK
Group: DynoMotion |
Message: 12148 |
From: Hardy Family |
Date: 8/25/2015 |
Subject: Re: Writing 2nd half flash |
Thanks for the progress report. No great urgency, since we are probably a few weeks out from release. Look forward to getting new firmware (since it helps us test our "easy firmware update" procedure).
Regards, SJH | |